#!/bin/sh
pid=`ps -ef|grep demo-0.0.1-SNAPSHOT|grep -v grep|awk '{print $2}'`
if [ -n "$pid" ] 
then
{
	echo "======kill process====="
	echo $pid
	kill -9 $pid
}
fi 
echo "======start process======"
java -Dserver.port=8001 -jar /root/.jenkins/workspace/dadao-demo/target/demo-0.0.1-SNAPSHOT.jar > ./demo.log 2> ./demo-error.log &
echo "======start complete======"